def email_db_check_1():
  """Customer sends email to agent. Agent receives and marks done"""
  emailMsg = Customer1.SendEmail(GetOption("ESAddr"), text = "Hello, AILAgent")
  recEmails = AilAg3.AcceptEmail([emailMsg])
  if recEmails:
    AilAg3.MarkDoneEmail(emailMsg)
  jbd = JDB_Access("jdbc:microsoft:sqlserver://qatest2:1433", "sa", "sa", "com.microsoft.jdbc.sqlserver.SQLServerDriver")
  res = jbd.execSQL("select Id, Status from interaction", "esContact")
  for rec in res:
    print "ID %s, Status %s" %(rec[0], rec[1])

  